package com.company.netease2020;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Test202001 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] scores = new int[n];
        for (int i = 0; i < n; i++) {
            scores[i] = sc.nextInt();
        }
        int q = sc.nextInt();
        int[] ask = new int[q];
        for(int i = 0;i < q;i++){
            ask[i] = sc.nextInt();
        }
        double[] res = getRankOfScore(n,scores,q,ask);
        for (int i = 0; i < q; i++) {
            System.out.printf("%.6f",res[i]);
            System.out.println();
        }
    }

    // 获得百分数
    private static double[] getRankOfScore(int n, int[] scores, int q, int[] ask) {
        // 存储第i位的对应分数
        Map<Integer,Integer> score =new HashMap<>();
        for (int i = 0; i < n ; i++) {
            score.put(i + 1,scores[i]);
        }
        // 对分数排序
        Arrays.sort(scores);
        Map<Integer,Integer> peopleCount = new HashMap<>();
        int l = 0,r = 0;
        // 统计个数
        while (r < n){
            while (r < n && scores[l] == scores[r]){
                r++;
            }
            peopleCount.put(scores[l],r);
            if(r < n){
                l = r;
            }
        }
        // 计算
        double[] res = new double[q];
        for(int i = 0;i < q;i++){
            int s = score.get(ask[i]);
            res[i] = (peopleCount.get(s) - 1.0) / n * 100;
        }
        return res;
    }
}
